<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>无标题文档</title>
<style type="text/css">
body{margin:0;}
ul{margin:0; padding:0; list-style:none; position:relative;}
li{width:50px; height:50px; background-color:red; position:absolute; left:0; top:0;}
</style>
</head>
<body>
<ul id="ul1">
</ul>
<script src="myJS.js"></script>
<script>
var str = "";
for(var i=0;i<20;i++){
	str += "<li></li>";
}
$("ul1").innerHTML = str;
var aLi = document.getElementsByTagName("li");
for(var i=0;i<aLi.length;i++){
	aLi[i].style.left = i*51 + "px";
}
var i = 0;
var timer = null
document.onclick = function (){
	clearInterval(timer);
	timer = setInterval(function (){
		doMove(aLi[i++],500,7,"top");
		if(i===20){clearInterval(timer);}
	},200)
}
</script>
</body>
</html>
